//
//  GFFoodmarkCollectionViewCell.m
//  GoodFood
//
//  Created by dllo on 15/11/3.
//  Copyright © 2015年 荣伟峰. All rights reserved.
//

#import "GFFoodmarkCollectionViewCell.h"

@interface GFFoodmarkCollectionViewCell ()

@property (nonatomic, strong) UIImageView *foodImage;

@end

@implementation GFFoodmarkCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.foodImage = [[UIImageView alloc] init];
        [self.contentView addSubview:self.foodImage];
        
        
    }
    return self;
}

-(void)setModel:(GFFoodmarkModel *)model {
    
    if (_model != model) {
        _model = model;
    }
    
    self.foodImage.frame = CGRectMake(0, 0, (ScreenWidth - 40) / 3, (ScreenWidth - 40) / 3);
    [self.foodImage setImageWithURL:[NSURL URLWithString:model.picture_url] placeholderImage:[UIImage imageNamed:@"category_1"]];
}

@end
